package io.dy.klh;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author : dmj
 * @date: 2024/12/17 4:29 下午
 * @description:
 */
public class KlhDemo {

    public static S2 step1(){
        List<Integer> x = Arrays.asList(1,2,3);
        S1 s1 = a -> b -> c->{
            List<Integer> finish = new ArrayList<>();
            finish.addAll(a);
            finish.addAll(b);
            finish.addAll(c);
            return finish;
        };
        return s1.op(x);
    }

    public static S3 step2(S2 s2){
        List<Integer> y = Arrays.asList(4,5,6);
        return s2.op(y);
    }

    public static void step3(S3 s3){
        List<Integer> z = Arrays.asList(7,8,9);
        System.out.println(s3.op(z));
    }

    public static void main(String[] args) {
        step3(step2(step1()));
    }



    interface S1{
        S2 op(List<Integer> list);
    }

    interface S2{
        S3 op(List<Integer> list);
    }

    interface S3{
        List<Integer> op(List<Integer> list);
    }
}
